<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:s="http://jboss.com/products/seam/taglib"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:rich="http://richfaces.org/rich"
                template="layout/template.xhtml">

    <ui:define name="body">

        <h:messages globalOnly="true" styleClass="message"/>

        <rich:panel>
            <f:facet name="header">learningOutcomeList</f:facet>

            <div class="results">
                <h:outputText value="No learningOutcome exists"
                              rendered="#{empty learningOutcomeList.resultList}"/>
                <rich:dataTable id="learningOutcomeList" var="learningOutcome"
                                value="#{learningOutcomeList.resultList}"
                                rendered="#{not empty learningOutcomeList.resultList}">
                    <h:column>
                        <f:facet name="header">PG</f:facet>
                        #{learningOutcome.programGoal.number}
                    </h:column>
                    <h:column>
                        <f:facet name="header">Program Goal</f:facet>
                        #{learningOutcome.programGoal.description}
                    </h:column>
                    <h:column>
                        <f:facet name="header">LO</f:facet>
                        #{learningOutcome.programGoal.number}.#{learningOutcome.number}
                    </h:column>
                    <h:column>
                        <f:facet name="header">Learning Outcome</f:facet>
                        #{learningOutcome.description}
                    </h:column>
                    <h:column>
                        <f:facet name="header">Assessement Tool</f:facet>
                        #{learningOutcome.assessementTool}
                    </h:column>
                    <h:column>
                        <f:facet name="header">Time Schedule</f:facet>
                        #{learningOutcome.timeSchedule}
                    </h:column>
                    <h:column>
                        <f:facet name="header">Action</f:facet>
                        <s:link view="/#{empty loListFrom ? 'learningOutcome' : loListFrom}.xhtml" value="Select">
                            <f:param name="learningOutcomeId" value="#{learningOutcome.id}" />
                        </s:link>
                    </h:column>
                </rich:dataTable>

            </div>

        </rich:panel>

        <div class="actionButtons">
            <s:button id="done"
                      value="Create Learning Outcome"
                      view="/learningOutcomeEdit.xhtml"/>
        </div>

    </ui:define>

</ui:composition>

